
#ifndef KRAWD3D9MATERIAL_H
#define KRAWD3D9MATERIAL_H

#include "kraw/kraw3dmaterial.h"

class KrawD3D9Material : public Kraw3DMaterial
{
public:

    //initialize material
    KrawD3D9Material();
    ~KrawD3D9Material();

    virtual bool Init();
    virtual void Destroy();

    virtual void* Load( Kraw3DModel* );
    virtual void Unload( void* pModelData );
    virtual void Render( void* pModelData );

protected:

    bool InitVertexDeclaration( Kraw3DModel*, void** );

    bool ExportVertices( Kraw3DModel*, uint&, float*& );
    bool ExportIndices( Kraw3DModel*, uint*& );
    void Delete( float*, uint* );

    void UpdateTransform();
    uint GetNumPrimitives( uint nIndices, uint type );

    uint vertexSize;
};

#endif /*KRAWD3D9MATERIAL_H*/
